home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / WORLDWID.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.6 KB  |  78 lines

  1. # WorldWide Access PPP and SLIP script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # 5-9-95 CEL
  4.  
  5. STRING username
  6. STRING password
  7. STRING framing
  8. STRING IPAddress
  9.  
  10. # uncomment for debugging
  11. #TRACE ON  
  12.  
  13. # reset maximum login timeout. 
  14. SetTimeout 60
  15.  
  16. # Get username from access method
  17. # if the Username field is empty, prompt the user for it.
  18. CfgGetValue "Username" username
  19. IF result = 0 THEN
  20.     GetInput "Enter your user name" username
  21.     IF result = 0 THEN
  22.         PRINT "Warning, no username entered"
  23.     ELSE
  24.         PRINT "Username set to ["; username; "]"
  25.     ENDIF
  26. ENDIF
  27.  
  28. # get password from access method
  29. # if the Password field is empty, prompt the user for it.
  30. CfgGetValue "Password" password
  31. IF result = 0 THEN
  32.     GetPassword "Enter your password" password
  33.     IF result = 0 THEN
  34.         PRINT "Warning, no password entered"
  35.     ELSE
  36.         PRINT "Password set."
  37.     ENDIF
  38. ENDIF
  39.  
  40. # get framing layer (MPPPP, MPSLIP)
  41. # abort with an error if we can't read the Framing setting
  42. CfgGetValue "Framing" framing
  43. IF result = 0 THEN
  44.     ABORT "Can't read 'Framing' setting from qdeck.ini"
  45. ENDIF
  46.  
  47. DELAY 2
  48.  
  49. CommSend    "%r"
  50.  
  51. CommWaitFor "login:"           # wait for login prompt
  52.  
  53. # The character before the user name indicates the type of connection.
  54. IF framing = "MPPPP" THEN
  55.     CommSend   "P"
  56. ENDIF
  57. IF framing = "MPSLIP" THEN
  58.     CommSend   "S"
  59. ENDIF
  60.  
  61. CommSend username
  62. CommSend "%r"
  63.  
  64. CommWaitFor "assword:"
  65.     CommSend password
  66.     CommSend "%r"
  67.  
  68. IF framing = "MPSLIP" THEN
  69.     CommWaitFor "enabled for IP address:"
  70.     CommReadIPAddr IPAddress
  71.     IF result>0 THEN
  72.         CfgSetValue "IPAddress" IPAddress
  73.            PRINT "%rIP Address set to: "; IPAddress
  74.     ENDIF
  75. ENDIF
  76.  
  77. END
  78.